package com.yourname.www.test;

import com.yourname.www.util.WindowUtil;

import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.io.IOException;
import java.util.Vector;

public class QureyStudentinfoDialog extends JDialog {
//    private final JTextField query_Text;//查询文本域
//    private final JComboBox query_List;//查询下拉选项
    private JDialog jf;//当前窗口
    private Container c;//
    private JLabel query_Label;//查询标签
    private JButton query_Button; //"查询"按钮。
    private JButton preciseQuery_Button; //"精确查询"按钮。
    private JButton details_Button; //"详细信息"按钮。
    private JTable jt; //表格。
    private JScrollPane jsp; //滚动条。
    private StudentModel studentModel;//学生数据模型类

    private static Vector<String> query_Option;

    static {
        query_Option = new Vector<String>();
        query_Option.add("全部");
        query_Option.add("学号");
        query_Option.add("姓名");
        query_Option.add("性别");
        query_Option.add("班级");
        query_Option.add("年级");
        query_Option.add("专业");
        query_Option.add("院系");
    }

    public static void main(String[] args) {
        new QureyStudentinfoDialog();
    }
    public QureyStudentinfoDialog(){
        setBasicinfo();
        //this.setLayout(null); //设置布局为空
        c = this.getContentPane();
        //获取布局容器
        c=this.getContentPane();
        //设置背景颜色
        c.setBackground(Color.WHITE);
        //查询面板
        JPanel jp2 = new JPanel();
        query_Label = new JLabel("请输入查询信息:");
        jp2.add(query_Label);
        c.add(jp2,BorderLayout.NORTH);
        this.setVisible(true);
    }
    public void setBasicinfo(){
        this.setTitle("查询学生信息");//登录窗口标题
        this.setSize(600,500);
        this.jf=this;

        //获取Logo
        try {
            Image img = ImageIO.read(this.getClass().getResource("/Logo.png"));
            this.setIconImage(img);
        } catch (IOException e1){
            e1.printStackTrace();
        }


        //关闭窗口按钮
        this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
        //限制用户修改窗口大小
        this.setResizable(false);
        //调用工具实现窗口位置居中
        WindowUtil.setFrameCenter(this);

    }

    private class StudentModel {
    }
}
